<!--产品编辑-->
<template>
    <div>
        <el-tabs v-model="activeName2" type="card" >
            <el-tab-pane label="当前用户版本" name="first">
                <p>当前用户版本7</p>
                <div class="block">
                      <span class="wrapper" style="padding-bottom: 20px">
                          <!--<el-button type="info" @click="openDialog('showHistory')">查看历史版本</el-button>-->
                      </span>
                </div>
                <el-row>
                    <!--修改历史记录内容-->
                    <el-dialog title="修改记录" :visible.sync="dialog.showHistory.open" size="large"
                               v-if="dialog.showHistory.open" :modal=false>
                        <el-row :gutter="20">
                            <el-col :span="3"><span>版本号</span></el-col>
                            <el-col :span="3"><span>编辑人</span></el-col>
                            <el-col :span="3"><span>提交时间</span></el-col>
                            <el-col :span="3"><span>审核时间</span></el-col>
                            <el-col :span="3"><span>审核结果</span></el-col>
                            <el-col :span="3">审核人</el-col>
                            <el-col :span="3">操作</el-col>
                        </el-row>
                        <el-row :gutter="20" style="padding: 20px 0">
                            <el-col :span="3"><span>1</span></el-col>
                            <el-col :span="3"><span>李文龙</span></el-col>
                            <el-col :span="3"><span>2016-07-07</span></el-col>
                            <el-col :span="3"><span>2017-07-07</span></el-col>
                            <el-col :span="3"><span>通过</span></el-col>
                            <el-col :span="3">袁裕国</el-col>
                            <el-col :span="3">查看此版本</el-col>
                        </el-row>
                    </el-dialog>
                    <el-col :span="6"><h2>产品资料</h2></el-col>
                </el-row>
                <el-row>
                    <el-col :span="16">
                        <!--名称-->
                        <el-form ref="form" :model="form" label-width="120px" :inline="true" :label-position="pos">
                            <el-form-item label="名称" prop="name" :rules="[qfValidator.checkPname()]">
                                <el-input  placeholder="名称" v-model="form.name"></el-input>
                            </el-form-item>
                        </el-form>
                        <el-form  :model="form" label-width="120px" :inline="true" :label-position="pos" >
                            <el-form-item label="主要技术路径*">
                               <span>余热回收</span> <span>余热回收</span> <el-button type="info" size="mini">设置技术路径</el-button>
                            </el-form-item>
                        </el-form>
                        <el-form :model="form" label-width="120px" :inline="true" :label-position="pos">
                            <el-form-item label="领域*">
                                <span>余热回收</span> <span>余热回收</span> <el-button type="info" size="mini">设置领域</el-button>
                            </el-form-item>
                        </el-form>
                        <!--<ul>-->
                            <!--<li><span class="mainListSty">名称</span><span>234</span></li>-->
                            <!--<li><span class="mainListSty">主要技术路径</span><span>123234</span></li>-->
                            <!--<li><span class="mainListSty">领域*</span><span>turient montes, nascetur ridiculus mus.</span></li>-->
                        <!--</ul>-->
                    </el-col>
                    <el-col :span="6"><div style="width:100px;height:100px;background: gray">logo</div></el-col>
                </el-row>
                <!--总体描述-->
                <h5 style="color: red">总体描述*</h5>
                <el-form  :model="form" label-width="120px" :inline="true">
                <el-form-item label="">
                    <script id="editor" type="text/plain"></script>
                </el-form-item>
                </el-form>
                <h5 style="color: red">推荐企业</h5>
                <el-tabs type="border-card">
                    <el-tab-pane label="设计方" ><hotDesign></hotDesign></el-tab-pane>
                    <el-tab-pane label="咨询方"><hotConsult></hotConsult></el-tab-pane>
                    <el-tab-pane label="承建方"><hotBuild></hotBuild></el-tab-pane>
                    <el-tab-pane label="设备供应方"><hotDevice></hotDevice></el-tab-pane>
                    <el-tab-pane label="投资方"><hotInvest></hotInvest></el-tab-pane>
                    <el-tab-pane label="运维方"><hotOps></hotOps></el-tab-pane>
                </el-tabs>
            </el-tab-pane>
        </el-tabs>
        <div style="margin:0 auto;width: 50px;height:50px;margin-top:20px">
            <el-button type="primary" @click="submitForm('form')">确定</el-button>
        </div>
    </div>
</template>
<script>
    import _http from '@/components/common/http.vue'
    import _param from '@/components/common/param.vue'
    import hotDesign from '@/components/working/common/productHotcompany/hotDesign.vue'
    import hotConsult from '@/components/working/common/productHotcompany/hotConsult.vue'
    import hotBuild from '@/components/working/common/productHotcompany/hotBuild.vue'
    import hotDevice from '@/components/working/common/productHotcompany/hotDevice.vue'
    import hotInvest from '@/components/working/common/productHotcompany/hotInvest.vue'
    import hotOps from '@/components/working/common/productHotcompany/hotOps.vue'
    export default {
        components:{hotDesign,hotConsult,hotBuild,hotDevice,hotInvest,hotOps},
        data() {
            return {
                pos:'left',
                dialog:{
                    showHistory:{
                        open:false
                    }
                },
                activeName2: 'first',
                baseValue:{
                    money:'5000',
                    faren:'俞兆洪',
                    linkMan:'成莹',
                    address:'浙江省 杭州市 萧山区 民和路 479号1701',
                    Email:'service@tanwin.cn',
                    phoneNum:'057156686688',
                    fax:'057156686688',
                    url:'www.tanwin.cn'
                },
                form: {
                    name: '',
                    region: '',
                    date1: '',
                    date2: '',
                    delivery: false,
                    type: [],
                    resource: '',
                    desc: ''
                }
            }
        },
//        弹出层
        methods:{
            openDialog(dialog){
                this.dialog[dialog].open = true
            },
            submitForm(formName) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        alert('submit!');
                    } else {
                        console.log('error submit!!');
                return false;
            }
            });
            },
        },
//        富文本
        mounted(){
            this.editor = UE.getEditor('editor');
        },
        destroyed() {
            this.editor.destroy();
        },
    }
</script>
<style>
    ul li{
        list-style: none;
        margin-top: 20px;
    }
    .listSty{
        display:inline-block;
        width: 150px
    }
    .mainListSty{
        display:inline-block;
        width: 150px;
        color: red;
    }
    .able:after{
        content: "√";
        color: #6ce26c;
    }
</style>